﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manager_ManagerInfomation : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string Username = txtUsername.Text;
        string Password = txtPassword.Text;
        string Email = txtEmail.Text;
        string Fullname = txtFullname.Text;
        string Mobile = txtMobile.Text;
        string Address = txtAddress.Text;

        Manager managerOBJ = new Manager();

        managerOBJ.Username = Username;
        managerOBJ.Password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5");
        managerOBJ.Email = Email;
        managerOBJ.Fullname = Fullname;
        managerOBJ.Address = Address;
        managerOBJ.Mobile = Mobile;

        bool check = false;

        check = RegisterManager.AddNewManager(managerOBJ);
        if (check == true)
            MessagesBox.Show("Add New Success !");
        else
            MessagesBox.Show("Not Add New !Please again . . .");

    }
    protected void btnReset_Click(object sender, EventArgs e)
    {

    }
}